Skip to content

HYBIM-623: Migrate Vertex AI instrumentation to TelemetryHandler/LLMInvocation#271

Open
shuwpan wants to merge 2 commits intosignalfx:mainfrom
shuwpan:HYBIM-623_replace_current_impl_with_LLMInvocation
Open

HYBIM-623: Migrate Vertex AI instrumentation to TelemetryHandler/LLMInvocation#271
shuwpan wants to merge 2 commits intosignalfx:mainfrom
shuwpan:HYBIM-623_replace_current_impl_with_LLMInvocation

Conversation

@shuwpan
Copy link
Copy Markdown
Contributor

@shuwpan shuwpan commented Apr 14, 2026

  • Migrate from raw spans to TelemetryHandler lifecycle (start_llm/stop_llm/fail_llm)
  • Build LLMInvocation with text and tool-response message parts
  • Remove _StabilityMode branching, events.py, and completion_hook paths
  • Remove experimental test files (merged into main test suite)

https://shw-playground.signalfx.com/#/apm/traces/d5ce239acbd7293345fb2aba09e60d44

@shuwpan shuwpan requested review from a team as code owners April 14, 2026 21:55
@shuwpan shuwpan force-pushed the HYBIM-623_replace_current_impl_with_LLMInvocation branch from b2e6af8 to b8b1d2d Compare April 14, 2026 21:58
@shuwpan shuwpan force-pushed the HYBIM-623_replace_current_impl_with_LLMInvocation branch from 4ab139b to f141105 Compare April 17, 2026 19:36
shuwpan added 2 commits April 17, 2026 13:07
…nvocation

- Migrate from raw spans to TelemetryHandler lifecycle (start_llm/stop_llm/fail_llm)
- Build LLMInvocation with text and tool-response message parts
- Remove _StabilityMode branching, events.py, and completion_hook paths
- Remove experimental test files (merged into main test suite)
@shuwpan shuwpan force-pushed the HYBIM-623_replace_current_impl_with_LLMInvocation branch from 5778338 to dc5e3dc Compare April 17, 2026 20:11
@shuningc
Copy link
Copy Markdown
Contributor

  1. We now have a separate flag for tool definitions collection: OTEL_INSTRUMENTATION_GENAI_CAPTURE_TOOL_DEFINITIONS. The data will be collected only when both capture content and this flag have been enabled. We can use should_capture_tool_definitions() check to gate the serialization
  2. We can set invocation.tool_definitions (the dedicated field) instead of invocation.attributes[...]

@shuwpan
Copy link
Copy Markdown
Contributor Author

shuwpan commented Apr 20, 2026

  1. We now have a separate flag for tool definitions collection: OTEL_INSTRUMENTATION_GENAI_CAPTURE_TOOL_DEFINITIONS. The data will be collected only when both capture content and this flag have been enabled. We can use should_capture_tool_definitions() check to gate the serialization
  2. We can set invocation.tool_definitions (the dedicated field) instead of invocation.attributes[...]

Good catch — will address both in PR #275. This PR focuses on the core LLMInvocation migration; tool-related changes (including this fix) are grouped in #275 for cleaner scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants